package com.zyj.dynds.mapper;

import com.zyj.dynds.model.User;
import org.apache.ibatis.annotations.*;

public interface UserMapper2 {

    @Insert("insert into `user`(id, name) values(#{id}, #{name})")
    void save(User user);

    @Select("select * from `user` where id = #{id}")
    User getById(@Param("id")int id);

    @Update("update `user` set name = #{name} where id = #{id}")
    void updateById(User user);

    @Delete("delete from `user` where id = #{id}")
    void deleteById(@Param("id")int id);

}
